package com.zhang.service;

import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Service;

/**
 * @author ZhangJunqi
 * @Date 2022/3/23 -22:50
 */
@Service//消费者是sping的service
public class UserService {
    @Reference
    TicketService ticketService;
    public String buyTicket(){
        System.out.println("从注册中心拿Ticket");
        return ticketService.getTicket ();
    }
}
